<template>
	<view class="joinGroup">
		<image :src="systemData.wechat_image" mode="widthFix" :show-menu-by-longpress="true"></image>
	<!-- 	<view class="btn-box">
			<view @click="handleDownImg" >下载二维码</view>
		</view> -->
		 
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		computed: {
			systemData() {
				return this.$store.state.systemData
			}
		},
		onShareAppMessage() {
			return {
				title: this.systemData.qun_share_title, // 分享的标题
				imageUrl: this.systemData.qun_share_image, // 分享卡片的图片，可选
				path: '/pages/pdf/joinGroup' // 分享的路径，必须在pages.json中注册
			};
		},
		methods: {
			handleDownImg(){
				let imagePath =this.systemData.wechat_image;
				 uni.getImageInfo({
				             src: imagePath,
				             success: function (res) {
				               var path=res.path;
				               uni.saveImageToPhotosAlbum({
				                 filePath: path,
				                 success(res) {
				                   uni.showToast({
				                     title: '保存成功',
				                     icon: "none"
				                   })
				                   console.log(res);
				                 },
				                 fail(res) {
				                   uni.showToast({
				                     title: '保存失败',
				                     icon: "none"
				                   })
				                   console.log(res);
				                 }
				               })
				             },
							 fail(res) {
							  
							   console.log(res);
							 }
				           })


			}
		}
	}
</script>

<style scoped lang="scss">
	.btn-box {
		width: 100%;
		position: fixed;
		left: 0;
		bottom: 0;
		height: 180rpx;
		background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #bde1f2);
	
		view {
			width: 650rpx;
			height: 85rpx;
			background: linear-gradient(to right, #eec25b, #f7e7ad);
			border-radius: 40rpx;
			margin: 40rpx auto;
			text-align: center;
			line-height: 85rpx;
			color: #fff;
			font-size: 32rpx;
			letter-spacing: 4rpx;
			font-weight: 800;
		}
	}
	.joinGroup{
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		font-size: 34rpx;
	}
image{
	width: 100%;
	margin-bottom: 32rpx;
}
</style>
